export interface IRepository<T> {
  save(entity: T): Promise<T>;
  findById(id: string): Promise<T | null>;
  findOne(options: any): Promise<T | null>;
  find(options?: any): Promise<T[]>;
  delete(id: string): Promise<void>;
  findByParticipant?(userId: string): Promise<T[]>;
}

export interface IMessageRepository<T> extends IRepository<T> {
  findBySessionId(sessionId: string): Promise<T[]>;
}

export interface IUserRepository<T> extends IRepository<T> {
  findByUsername(username: string): Promise<T | null>;
  findByEmail(email: string): Promise<T | null>;
}